package com.zhenwei.zscm.model.vo.order;

import com.zhenwei.zscm.common.annotations.Insert;
import com.zhenwei.zscm.common.annotations.Update;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class CreateOrderVO {
    @NotEmpty(message = "主键ID不能为空", groups = {Update.class })
    private String guid;
    @NotEmpty(message = "维修单号不能为空", groups = {Insert.class, Update.class })
    private String orderNumber;
    /**
     * 客户id
     */
    @NotEmpty(message = "客户不能为空", groups = {Insert.class, Update.class })
    private String customerCode;

    /**
     * 客户名称
     */
    @NotEmpty(message = "客户不能为空", groups = {Insert.class, Update.class })
    private String customerName;

    /**
     * 站点名称
     */
    @NotEmpty(message = "站点名称不能为空", groups = {Insert.class, Update.class })
    private String siteName;

    /**
     * 联系人
     */
    @NotEmpty(message = "联系人不能为空", groups = {Insert.class, Update.class })
    private String contactor;

    /**
     * 联系电话
     */
    @NotEmpty(message = "联系电话不能为空", groups = {Insert.class, Update.class })
    private String telephone;

    /**
     * 地址
     */
    @NotEmpty(message = "地址不能为空", groups = {Insert.class, Update.class })
    private String address;

    /**
     * 快递接受日期
     */
    @NotNull(message = "接收快递日期不能为空", groups = {Insert.class, Update.class })
    private Date receiveDate;

    /**
     * 快递接收单号
     */
    @NotEmpty(message = "接收快递单号不能为空", groups = {Insert.class, Update.class })
    private String receiveNumber;

    @NotEmpty(message = "产品列表不能为空", groups = {Insert.class, Update.class })
    @Valid
    private List<CreateOrderProductVO> products;

    private String comment;
    private List<String> files;
}
